﻿/*	
	stencil - action script 3 isometric game engine.

	http://code.google.com/p/stencilas3/
	
	Copyright (c) 2010 Max Zhuravkov, All Rights Reserved.

	Permission is hereby granted, free of charge, to any person obtaining a copy of
	this software and associated documentation files (the "Software"), to deal in
	the Software without restriction, including without limitation the rights to
	use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
	of the Software, and to permit persons to whom the Software is furnished to do
	so, subject to the following conditions:

	The above copyright notice and this permission notice shall be included in all
	copies or substantial portions of the Software.

	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
	IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
	FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
	AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
	LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
	OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
	SOFTWARE.
*/
package stencil.core.engine.scene.view 
{
	import flash.geom.Rectangle;	
	import flash.utils.Dictionary;
	import stencil.core.engine.display.ITileRenderer;
	import stencil.core.engine.display.IGraphicObject;
	import stencil.core.engine.IObjectFactory;
	import stencil.core.engine.scene.view.IDisplayFilter;
	import stencil.core.engine.scene.ISceneModel;
	import stencil.core.engine.ICameraDisplay;
	
	
	/**
	 * @author Max Zhuravkov
	 */
	public interface ISceneView extends IGraphicObject, ICameraDisplay {
		
		/**
		 * The display object manager.
		 */
		function set displayObjectFactory(value:IObjectFactory):void;
		
		function get displayObjectFactory():IObjectFactory;		
		
		/**
		 * The scene to display.
		 */
		function set scene(value:ISceneModel):void;
		
		function get scene():ISceneModel;
		
		/**
		 * The number of components added.
		 */
		function get componentNumber():int;
		
		/**
		 * 
		 */
		function set viewPort(value:Rectangle):void;
		
		function get viewPort():Rectangle;
		
		/**
		 * x coordinate of the mouse pointer.
		 */
		function get mouseX():Number;
		
		/**
		 * y coordinate of the mouse pointer.
		 */
		function get mouseY():Number;

		/**
		 * Adds component.
		 * 
		 * @param	component	the component
		 */
		function addComponent(component:IGraphicObject):void;
		
		/**
		 * Adds the given component at the specified position.
		 * 
		 * @param	component	the component
		 * @param	index	the position to which the component is added.
		 */
		function addComponentAt(component:IGraphicObject, index:int):void;
		
		/**
		 * Removes the given component.
		 * 
		 * @param	component	the component.
		 */
		function removeComponent(component:IGraphicObject):void;
		
		/**
		 * Removed the component from the given position.
		 * 
		 * @param	index	the position.
		 */
		function removeComponentAt(index:int):void;
		
		/**
		 * Tests whether this view contains the given component or not.
		 * 
		 * @param	component	the component to test.
		 * 
		 * @return	true if this view contains the given component and false otherwise
		 */
		function containsComponent(component:IGraphicObject):Boolean;
		
		/**
		 * Returns the component that is placed at the given position if any.
		 * 
		 * @param	index	the position.
		 * 
		 * @return	the component that exists at the given position.
		 */
		function getComponentAt(index:int):IGraphicObject;
		
		/**
		 * Returns the component with the specified name.
		 * 
		 * @param	name	the component name.
		 * 
		 * @return
		 */
		function getComponentByName(name:String):IGraphicObject;
		
		/**
		 * A map of name to index values that describes display order of components.
		 */
		//function set componentOrder(value:Dictionary):void;
		
		//function get componentOrder():Dictionary;
		
		/**
		 * The display filter.
		 */
		function set displayFilter(o:IDisplayFilter):void;
		
		function get displayFilter():IDisplayFilter;
	}
	
}